home *** CD-ROM | disk | FTP | other *** search
- Path: access.mbnet.mb.ca!natewild
- From: natewild@mbnet.mb.ca (Nathan T. Wild)
- Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.programmer
- Subject: Device Drivers
- Date: 30 Jan 1996 21:22:33 GMT
- Organization: The University of Manitoba
- Message-ID: <4em26p$el1@canopus.cc.umanitoba.ca>
- NNTP-Posting-Host: access.mbnet.mb.ca
- X-Newsreader: TIN [version 1.2 PL2]
-
- I would like to be able to make device drivers in C. I writing an
- application which uses loadable modules for some of it's functions.
-
- Currently these functions are written in Assembly language. The
- assembled executable code is stripped of it's EXE header and the
- contents is written directly to memory... Then a function pointer is
- set to point to this code.
-
- This works... But how can I go about generating these executable
- "driver" files in C, rather than assembly language? In order to link my
- C code, I need a main()?
-
- Can this be done? Can somebody explain how to do it?
-
- I actually want a C++ class to load these modules in from it's
- constructor, but I am currently stuck writing everything in assembly
- language?
-
- Does anyone know how to translate the object-code generated by the C
- compiler into raw executable code for loading as a device driver in this
- manner?
-
- I am using DOS and Borland C++, but that shouldn't really matter...
-
-
-
- Please respond via email, as I do not have live access to this group.
- If I get a collection of good responses, I will post a follow-up to
- comp.os.msdos.programmer, comp.lang.c and comp.lang.c++
-